from dao.user_dao import (get_students_by_class_id)
from dao.grade_dao import (get_grade_by_class_id)


def get_students_by_c_id(class_id):
    return get_students_by_class_id(class_id)


def get_student_by_class_id(class_id):
    users = get_students_by_class_id(class_id)
    a_grade = get_grade_by_class_id(class_id)
    for index, user in enumerate(users):
        user['id'] = index + 1
        user['m_id'] = a_grade['m_id']
    return users